
/**
 * @Project : Clion_ProgrammingExercises
 * @File : 0848
 * @Author : WangRuoyu 
 * @Date : 2023/5/21 21:11
 */

#include <vector>
#include <queue>
#include "iostream"

using namespace std;

const int N = 1e5 + 10;
const int M = 1e5 + 10;
int h[N];
int e[M];
int ne[M];
int idx = 0;
int d[N];

void add(int a, int b) {
    e[idx] = b;
    ne[idx] = h[a];
    h[a] = idx++;
}

int main() {
    int n, m;
    scanf("%d %d", &n, &m);
    vector<int> list;

    for (int &i: h) {
        i = -1;
    }

    for (int i = 0; i < m; ++i) {
        int a, b;
        scanf("%d %d", &a, &b);
        if (a == b) {
            printf("-1");
            return 0;
        }
        add(a, b);
        d[b]++;
    }

    queue<int> q;

    for (int i = 1; i <= n; ++i) {
        if (!d[i]) {
            q.push(i);
            list.push_back(i);
        }
    }

    while (!q.empty()) {
        int p = q.front();
        q.pop();
        for (int i = h[p]; i != -1; i = ne[i]) {
            int j = e[i];
            d[j]--;
            if (!d[j]) {
                q.push(j);
                list.push_back(j);
            }
        }
    }

    if (list.size() == n) {
        for (int i = 0; i < n; ++i) {
            printf("%d ", list[i]);
        }
    } else {
        printf("-1");
    }

    return 0;
}